/**
 * Project: ld.biz.service
 * 
 * File Created at 2012-9-23
 * $Id$
 * 
 * Copyright 1999-2100 Alibaba.com Corporation Limited.
 * All rights reserved.
 *
 * This software is the confidential and proprietary information of
 * Alibaba Company. ("Confidential Information").  You shall not
 * disclose such Confidential Information and shall use it only in
 * accordance with the terms of the license agreement you entered into
 * with Alibaba.com.
 */
package com.liangdev.biz.core.autocode;

import java.util.HashMap;
import java.util.Map;

import com.liangdev.biz.entity.autocode.TableMetaData;
import com.liangdev.biz.entity.autocode.TemplateContext;

/**
 * TODO Comment of DBMetaDataConverter
 * 
 * @author chongan.wangca
 */
public class VelocityContextConstructor {

    /**
     * 构造Velocity渲染时需要的变量数据
     * 
     * @param tableMetaData
     * @return
     */
    public static Map<String, Object> make(TableMetaData tableMetaData) {
        Map<String, Object> map = new HashMap<String, Object>();
        TemplateContext templateContext = new TemplateContext();
        templateContext.setTableMetaData(tableMetaData);
        map.put("templateContext", templateContext);
        return map;
    }

}
